Skip to content

Fix front component pointer/mouse event coordinates#21117

Merged
bosiraphael merged 11 commits into
mainfrom
r--fix-fc-pointer-event-coordinates
Jun 2, 2026
Merged

Fix front component pointer/mouse event coordinates#21117
bosiraphael merged 11 commits into
mainfrom
r--fix-fc-pointer-event-coordinates

Conversation

@bosiraphael

@bosiraphael bosiraphael commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Fixes #21000

Front-component event handlers read standard event fields (event.clientX, event.offsetX, …), but these were always undefined. On the remote side, serialized event data was passed only as the CustomEvent's detail — and CustomEvent ignores every constructor option except detail, so the values lived at event.detail.clientX and never on the event object itself.

  • Added applySerializedEventProperties, to copy a curated allowlist of event-level keys onto the event. Element/target state (value, checked, files, scroll, media props) stays in applySerializedEventTargetProperties, applied to this (the dispatch element = event.target).
  • Added x/y to SerializedEventData and to host-side serialization in createHtmlHostWrapper.
  • Added an svg-pointer story + createHtmlTagPointerStory

Note: Also pinned @types/react to v18 so the renderer stops dragging in React 19 types and breaking typecheck.

@twenty-ci-bot-public

Copy link
Copy Markdown

👋 Thanks for contributing to Twenty!

Your PR has been set to draft while you work on it. Once you're done, mark it as Ready for review and our automated checks will run.

Looking forward to your contribution!

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 13 files

Re-trigger cubic

@twenty-ci-bot-public

twenty-ci-bot-public Bot commented Jun 2, 2026

Copy link
Copy Markdown

🔍 Automated Pre-Review

No issues detected - This PR is ready for human review.


View details

Automated pre-review — human approval still required.

@Weiko Weiko left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bosiraphael bosiraphael added this pull request to the merge queue Jun 2, 2026
Merged via the queue into main with commit 1833fa8 Jun 2, 2026
92 checks passed
@bosiraphael bosiraphael deleted the r--fix-fc-pointer-event-coordinates branch June 2, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FrontComponent sandbox: pointer event handlers fire, but all position fields (clientX/Y, pageX/Y, movementX/Y…) are stripped to undefined

3 participants